<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>layui</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <link rel="stylesheet" href="__PUBLIC__/layui/css/layui.css"  media="all">
  <link rel="stylesheet" href="__PUBLIC__/font-awesome/css/font-awesome.min.css" media="all" />
  <link rel="stylesheet" href="__CSS__/admin.css"  media="all">
</head>
<body style="padding:10px;">
  <div class="tplay-body-div">
    <div class="layui-tab">
      <ul class="layui-tab-title">
        <li><a href="{:url('admin/lawyer_case/shenhe_index')}" class="a_menu">客户案例管理</a></li>
      </ul>
    </div> 
    <div style="margin-top: 20px;">
    </div>
    <form class="layui-form" id="form" enctype='multipart/form-data'>
      <input type="hidden" name="id" value="{$case.id??''}" >
        <div class="layui-form-item" id="admin">
        <label class="layui-form-label">添加人</label>
        <div class="layui-input-block" style="max-width:600px;">
          <input readonly="" name="title" lay-verify="title" autocomplete="off" placeholder="请输入标题" class="layui-input" type="text" value="{$case.a_name??''}">
        </div>
      </div>
        <div class="layui-form-item" id="admin">
        <label class="layui-form-label">案例律师</label>
        <div class="layui-input-block" style="max-width:600px;">
          <input readonly="" name="title" lay-verify="title" autocomplete="off" placeholder="请输入标题" class="layui-input" type="text" value="{$case.l_name??''}">
        </div>
      </div>
         <div class="layui-form-item" id="admin">
        <label class="layui-form-label">标题</label>
        <div class="layui-input-block" style="max-width:600px;">
          <input readonly="" name="title" lay-verify="title" autocomplete="off" placeholder="请输入标题" class="layui-input" type="text" value="{$case.title??''}">
        </div>
      </div>
	  <div class="layui-form-item" id="admin">
        <label class="layui-form-label">副标题</label>
        <div class="layui-input-block" style="max-width:600px;">
          <input readonly="" name="subtitle" lay-verify="title" autocomplete="off" placeholder="请输入副标题" class="layui-input" type="text" value="{$case.subtitle??''}">
        </div>
      </div>
       {notempty name="$case.img"}
        <div class="layui-form-item">
        <div class="layui-input-block" style="max-width:600px;">
          <img width="150" height="150" src="__UPLOAD__/lawyer_case/{$case.img}">
        </div>
      </div>
      {/notempty}
     <div class="layui-form-item layui-form-text">
        <label class="layui-form-label">案例</label>
        <div class="layui-input-block" style="max-width:1000px;">
          <textarea placeholder="请输入内容" class="layui-textarea" readonly="readonly"  name="content" id="container" style="border:0;padding:0;height: 500px">{notempty name="$case.content"}{$case.content}{/notempty}</textarea>
        </div>
      </div>
<div class="layui-form-item">
    <label class="layui-form-label">单选框</label>
    <div class="layui-input-block">
      <input type="radio" name="state" value="0" title="待审核" checked=""><div class="layui-unselect layui-form-radio layui-form-radioed"><i class="layui-anim layui-icon"></i><div>待审核</div></div>
      <input type="radio" name="state" value="1" title="通过"><div class="layui-unselect layui-form-radio"><i class="layui-anim layui-icon"></i><div>通过</div></div>
      <input type="radio" name="state" value="2" title="拒绝"><div class="layui-unselect layui-form-radio"><i class="layui-anim layui-icon"></i><div>拒绝</div></div>
    </div>
  </div>
      <div class="layui-form-item">
        <div class="layui-input-block">
          <button class="layui-btn" lay-submit lay-filter="admin">立即提交</button>
          <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
      </div>
      
    </form>


    <script src="__PUBLIC__/layui/layui.js"></script>
    <script src="__PUBLIC__/jquery/jquery.min.js"></script>
  <script src="__JS__/form.js"></script>
    <script src="__JS__/layer.js"></script>
<script>
      
      layui.use(['layer', 'form'], function() {
          var layer = layui.layer,
              $ = layui.jquery,
              form = layui.form;
          $(window).on('load', function() {
              form.on('submit(admin)', function(data) {
                  
          $("#form").ajaxSubmit({
          type: 'post',  
          dataType:"json",
          url:"{:url('admin/lawyer_case/shenhe')}",
          success: function(res){
		  <!-- console.log(res); -->
            if(res.code == 1) {
              layer.alert(res.msg, function(index){
                location.href = res.url;
              })
            } else {
              layer.msg(res.msg);
              }
          },  
          error: function(XmlHttpRequest, textStatus, errorThrown){  
            alert( "error");  
          }  
        });
                  return false;
              });
          });
      });
    </script>

    <!-- 配置文件 -->
    <script type="text/javascript" src="__PUBLIC__/ueditor/ueditor.config.js"></script>
    <!-- 编辑器源码文件 -->
    <script type="text/javascript" src="__PUBLIC__/ueditor/ueditor.all.js"></script>
    <!-- 实例化编辑器 -->
    <script type="text/javascript">
        var ue = UE.getEditor('container');
    </script>
   
  </div>
</body>
</html>